System and method for inline erasure coding for a distributed log structured storage system

ABSTRACT

Presented herein are methodologies for implementing erasure coding in a distributed log structured storage system. A method includes receiving a write request for first data from a file system, selecting a physical sector on a selected storage device in an array of storage devices on which to store the first data, assigning a key to the physical sector, storing the key and an indication of the physical sector in a key-to-physical medium map, erasure coding the data, including generating parity data associated with the first data, writing the first data and the parity data as a data stripe to each storage device in the array of storage devices and, in response to receiving the write request, sending the key to the file system. Read, update, and delete procedures in the context of a log structured framework are also described.

TECHNICAL FIELD

The present disclosure relates to fault tolerant data storage and backupsystems.

BACKGROUND

Enterprise storage systems currently available are typically proprietarystorage appliances that integrate the storage controller functions andthe storage media into the same physical unit. This centralized modelmakes it harder to independently scale the storage systems' capacity,performance and cost. Users can get tied to one expensive appliancewithout the flexibility of adapting it to different applicationrequirements that may change over time. For small and medium scaleenterprise, this may require substantial upfront capital cost. Forlarger enterprise datacenters, new storage appliances are added as thestorage capacity and performance requirements increase. These appliancesmay operate in silos and impose significant management overhead.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 depicts a first embodiment of an array of disks that provideserasure coded data storage for a file system in accordance with anexample embodiment.

FIG. 2 depicts a second embodiment of an array of disks that provideserasure coded data storage for a file system in accordance with anexample embodiment.

FIG. 3 depicts a third embodiment of an array of disks that provideserasure coded data storage for a file system in accordance with anexample embodiment.

FIG. 4 depicts a state of an array of disks after a given erasure codedRAID stripe has been written in accordance with an example embodiment.

FIG. 5 depicts a state of an array of disks in connection with a writeprocedure when one disk is offline in accordance with an exampleembodiment.

FIGS. 6A, 6B and 6C depict states of an array of disks in connectionwith a RAID stripe relocation in accordance with an example embodiment.

FIG. 7 is a flow chart depicting a series of operations for operating astorage system in accordance with an example embodiment.

FIG. 8 is a flow chart depicting a series of operations for operating astorage system in accordance with an example embodiment.

FIG. 9 depicts a device (e.g., a storage system or server device) onwhich the several described embodiments may be implemented.

DESCRIPTION OF EXAMPLE EMBODIMENTS Overview

Presented herein are techniques for a distributed storage systemimplementing erasure coding. A method includes receiving a write requestfor first data from a file system, selecting a physical sector on aselected storage device in an array of storage devices on which to storethe first data, assigning a key to the physical sector, storing the keyand an indication of the physical sector in a key-to-physical mediummap, erasure coding the data, including generating parity dataassociated with the first data, writing the first data and the paritydata as a data stripe to each storage device in the array of storagedevices and in response to receiving the write request, sending the keyto the file system.

A device or apparatus is also described. The device may include aninterface unit configured to enable network communications, a memory,and one or more processors coupled to the interface unit and the memory,and configured to: receive a write request for first data from a filesystem, select a physical sector on a selected storage device in anarray of storage devices on which to store the first data, assign a keyto the physical sector, store the key and an indication of the physicalsector in a key-to-physical medium map, erasure code the data, includinggenerating parity data associated with the first data, write the firstdata and the parity data as a data stripe to each storage device in thearray of storage devices, and in response to receipt of the writerequest, send the key to the file system.

Example Embodiments

FIG. 1 depicts a first embodiment of an array of disks that provideserasure coded data storage for a file system in accordance with anexample embodiment. Specifically, FIG. 1 shows a file system 110 thatincludes a plurality of files 120(1), 120(2), 120(N), each including arespective file map 125(1), 125(2), 125(N). Each of the file maps, e.g.,file map 125(1), includes a series of logical block addresses (LBAs)that correspond to data that is stored on a storage medium 175. In thiscase, the individual blocks of data are “AAA”, “BBB” and “CCC”corresponding to, or pointed to by, LBA0, LBA1, and LBA2, respectively.

The storage medium 175 may be, e.g., one or more disk drives 171(0),171(1), 171(2), 171(3), 171(4) in an enclosure 170. That is, each LBA ina given file map, e.g., file map 125(1), is associated with a physicalsector (PS) on a given disk. For example, LBA0 in file map 125(1)corresponds to data “AAA”, which is stored at physical sector 0 (PS0) ofdisk 171(0). LBA1 in file map 125(1) corresponds to data “BBB”, which isstored at physical sector 0 (PS0) of disk 171(1). LBA2 in file map125(1) corresponds to data “CCC”, which is stored at physical sector 0(PS0) on disk 171(2).

In accordance with embodiments described herein, the storage medium 175may be configured as a redundant array of disk (RAID) systemimplementing an erasure coding scheme for data recovery in the event agiven disk drive in the RAID system becomes unavailable. All of thedisks may be housed in a single enclosure 170. Thus, as shown in FIG. 1,not only are physical sectors 0 on disks 171(0), 171(1), 171(2)configured to store data “AAA,” “BBB” and “CCC,” respectively, butphysical sectors 0 of disks 171(3), 171(4) are further configured tostore parity data PR00, PR01, respectively, that enable the erasurecoding scheme to, in the case shown with five disks, to lose any twodisks and still recover any data in a given stripe of data (i.e., RAIDstripe 0, the data stored across physical sectors 0 of all the disks).

In order for, e.g., the file map 125(1) to access data corresponding toany one of its LBAs, a disk and physical sector number is needed. In atypical file system, the file map itself stores the relevant disk andphysical sector number to locate the desired data in the storage medium.However, in a RAID system that implements erasure coding, the filesystem 110 could be subjected to a significant number of updates. Forexample, consider an event that would cause RAID stripe 0 to be moved toe.g., RAID stripe 5 in FIG. 1. As will be appreciated by those skilledin the art, all of the physical sector numbers (PS0 s) that would bestored in a given file map, would then have to be changed, in this case,to PS5's for each of LBA0, LBA2, and LBA2. Such file system updating canquickly become burdensome to the file system 110 and bog down theoverall efficiency of a related computing system (shown in FIG. 9). Thatis, storage medium 175, configured as a RAID system, can cause filesystem 110 to have to update itself as a result of changes occurring inthe storage medium 175, but that are unrelated to the file system 110.This can unduly burden the file system 110.

To address this issue, embodiments described herein provide an improvedfile system interaction approach by providing an intermediary mappingscheme that is logically disposed between the file system 110 and thestorage medium 175 and that takes care of monitoring and adapting tochanges occurring in the storage medium 175. Specifically, akey-to-physical medium map 150 is arranged as a key-value index. The“key” component of the key-value index is unique, and may be generatedvia a monotonically increasing sequence. The “value” component of thekey-value index may be the disk number and physical sector of wheregiven data is stored in the storage medium 175. For example, and stillreferring to FIG. 1, key K1 is associated with D2 (171(2)) and PS0,which correspond to data “CCC”. As such, K is stored in association withLBA2 in file map 125(1). Similarly K2 is associated with D1 (171(1)) andPS0, which correspond to data “BBB”. As such, K2 is stored inassociation with LBA1 in file map 125(1). Likewise, K3 is associatedwith D0 (171(0)) and PS0, which correspond to data “AAA”. As such, K3 isstored in association with LBA0 in file map 125(1).

In an embodiment, key-to-physical medium map logic 155 is provided inconnection with key-to-physical medium map 150 and is configured to,among other things, generate the keys (e.g., monotonically, or via aunique fingerprint based on the data being stored), provide respectivekeys to file system 110 when file system requests a data write, and actas an intermediary between the file system 110 and storage medium 175when the file system 110 makes a read request for data stored in thestorage medium 175.

Thus, as shown in FIG. 1, there is provided an array of physical storagedevices configured to store segments of data in a striping fashionacross the array, and a key-to-physical medium map configured toassociate a key to (i) a given storage device in the array of physicalstorage devices and (ii) a given physical sector on the given storagedevice. Key-to-physical medium map logic 155 is configured to generatethe key, supply the key to a file map of a file system and act as anintermediary between the file system and the storage medium inconnection with data read requests and data write requests based on thekey.

With a system configured as shown in FIG. 1, only the key-to-physicalmedium map 150 needs to be updated when, e.g., a RAID stripe is moved inthe storage medium. That is, the keys themselves would not change, andas such, no changes are needed in the file maps 120(1), 120(2), 120(N)of the file system 110. Instead, the “value” pointed to by the keys(i.e., disk number and physical sector) configured as thekey-to-physical storage medium map 150 would change, thus enabling thefile system to still access the correct data despite a RAID stripe move.

Another advantage of implementing the key-to-physical medium map 150 asdisclosed herein is that a given key might be used in multiple filemaps. For example, K2, which corresponds to a disk and physical sectorfor the data “3BBB”, could also be re-used in, e.g., file map 2 125(2),assuming an LBA in file map 2 125(2) also was associated with data“BBB”.

While the configuration shown in FIG. 1 provides significant advantagesover conventional systems by masking data movement occurring in thestorage medium 175 from the file system 110, the key-to-physical mediummap 150, itself, may be considered a single point of failure, thusundercutting the fault tolerance advantages of the RAID systemconfigured with an erasure coding scheme.

FIG. 2 depicts a second embodiment of an array of disks that provideserasure coded data storage for a file system in accordance with anexample embodiment. FIG. 2 is similar to FIG. 1, except thekey-to-physical medium map 150, instead of being saved in a singlelocation associated with key-to-physical medium map logic 155, is savedor replicated to each of the disks 171(0), . . . , 171(4). In this way,the key-to-physical medium map 150 is no longer a single point offailure. Even if one of the disks 171(0) . . . . , 171(4) were to becomeunavailable, the entire key-to-physical medium map 150 would still beavailable on one or more other disks.

Also shown in FIG. 2 is additional functionality associated withkey-to-physical medium map logic 155. Key-to-physical medium map logic155 may be configured to (1) replicate the key-to-physical medium map150 to each disk 171(0), . . . , 171(4), (2) erasure code data that iswritten to the disks 171(0), . . . , 171(4), i.e., compute the paritydata (e.g., PR00, PR01, PR50, PR51) that complements “AAA,” “BBB,” and“CCC” in the instant example, and (3) generate and route keys to thefile system 110.

In the embodiment of FIG. 2, it is noted that the key-to-physical mediummap logic 155 is still a standalone element, and thus it, too, canfunction as a single point of failure.

To address this other potential single point of failure issue, FIG. 3depicts a third embodiment of an array of disks that provides erasurecoded data storage for a file system in accordance with an exampleembodiment. In FIG. 3, the key-to-physical medium map logic 155 is alsodistributed to each of the disks 171(0), . . . , 171(4) askey-to-physical medium map logic 155(0), 155(1), 155(2), 155(3), 155(4).By moving the key-to-physical medium map logic 155 to be instantiated oneach respective disk enclosure/controller module 170(0), . . . , 170(4),the key-to-physical medium map logic 155 also becomes fault tolerant. Aby-product of the distributed nature of the key-to-physical medium maplogic 155 functionality is that each disk 171(0), . . . , 171(4) can nowalso be in its own respective enclosure 170(0), 170(1), 170(2), 170(3),170(4). That is, each disk, even in a RAID arrangement, need not be tiedto the same enclosure (where “same enclosure” may be defined as beingpowered from a same source). As a result, disks, even running in a RAIDarrangement, may be physically distributed, providing still more faulttolerance.

As a further enhancement, FIG. 3 also shows that the file map system maybe provided with a disk reference or, more generally, a token, which maybe opaque, i.e., not have any explicit meaning, in addition to a key.For example, LBA0 in FIG. 3 stores K3 and D0 171(0). When thisinformation, in connection with a read request from the file system 110,is sent to the multiple respective enclosures 170(0), 170(1), 170(2),170(3), 170(4), each enclosure can determine whether it contains thestorage medium or disk from which the data (“AAA”) is being sought.Alternatively, this functionality can also be performed by each instanceof key-to-physical medium map logic 155(0), 155(1), 155(2), 155(3),155(4). In still another embodiment, the key is routed directly to disk0, 171(0). By providing a “hint” as to which storage device is beingtargeted, the non-targeted storage devices need not waste time lookingup a key in their respective key-value indexes (key-to-physical mediummap 150(0), etc.), only to realize the data being sought is resident onanother disk. In this particular case, key-to-physical medium map logic155(0) looks up K3 in its copy of the key-to-physical medium map 150(0)to determine that physical sector 0 (PS0) is being sought. PS0 contains“AAA,” and that data is then returned to the file system 110 in responseto its read request.

For completeness, LBA1 stores K2, D1, which points to disk 171(1) andPS0, and thus data “BBB.” LBA2 stores K1, D2, which points to disks171(2) and PS0, and thus data “CCC.”

A write request to the storage system may also be handled in a uniquefashion. Because the key-to-physical medium map logic 155 may bedistributed as shown in FIG. 3, only one of the key-to-physical mediummap logic 155(0), 155(1), 155(2), 155(3), 155(4) instantiations isselected, at a given time, as a “write leader” (WL) so that the multipleinstantiations of key-to-physical medium map logic are not collidingwith each other for the same storage medium resources upon receiving awrite request from the file system 110. In an embodiment, a distributedwrite leader election algorithm is used to select one instantiationamong the key-to-physical medium map logic 155(0), 155(1), 155(2),155(3), 155(4) instantiations. The selected instantiation becomes theWL. All writes to all disks for a given stripe are then performed“through” the selected WL.

In an embodiment, the WL buffers and collects enough writes to fill agiven stripe. If the data is not sufficient to fill a full stripe, zerosmay be added/padded. The WL then calculates the parity bits for the fullstripe. The WL then further generates key updates that are needed tostore the stripe. The WL then executes a commit data function, whichstores the data and keys on each physical enclosure. Once all the dataand keys are deemed to have been successfully persisted by each of thedisks, the writes are acknowledged, via the WL, to the file system 110.In the embodiment shown in FIG. 3, the WL is shown as key-to-physicalmedium map logic 155(0). However, at any given time, any one of thekey-to-physical medium map logic instantiations can function as thewrite leader when elected.

As an example of the foregoing, FIG. 4 depicts a state of an array ofdisks after a given erasure coded RAID stripe has been written inaccordance with an example embodiment. More specifically, in the exampleshown, RAID stripe 5 is updated. In this example, key-to-physical mediummap logic 155(0) functions as the write leader. As such, it collectsdata “XXX,” “YYY” and “ZZZ” that are to be written to the storage medium175. Key-to-physical medium map logic 155(0) calculates parity bitsPR50, PR51. Key-to-physical medium map logic 155(0) then assign keys tothe data items “XXX,” “YYY” and “ZZZ”. As a result of the foregoingoperations, the following payload may be generated by key-to-physicalmedium map logic 155(0):

StripeUpdatePacket = {  Data {XXX, YYY, ZZZ}  Parity {PR50, PR51}  Keys= {   K4 = D0,PS5   K5 = D1, PS5   K6 = D2, PS5   } }

The above StripeUpdatePacket is then delivered to all enclosures (i.e.,disks) in the update, namely 170(0), 170(1), 170(2), 170(3), 170(4), viaa network.

Each enclosure 170(0), 170(1), 170(2), 170(3), 170(4) then updates thestripe data for the keys it owns, and updates its key-to-physical mediummap 150(0), 159(1), 150(2), 150(3), 150(4) such that all keys includingnew keys K4, K5, K6, corresponding tokens and physical sector numbers.Each enclosure 170(0), 170(1), 170(2), 170(3), 170(4) then acknowledgesthe success of the write, as well as the key-to-physical medium mapupdates. The WL, in this case key-to-physical medium map logic 155(0),then acknowledges a write success back to file system 110.

FIG. 5 depicts a state of an array of disks in connection with a writeprocedure when one disk is offline in accordance with an exampleembodiment. As shown, physical enclosure 170(0) is offline. Thus, anyread or write request to that enclosure or its disk D0 171(0) will fail.Also, the WL, key-to-physical medium map logic 155(0), will not functionin such a state. To address this situation, a new write leader isselected. In this case, key-to-physical medium map logic 155(2) isselected. If more than a maximum number of enclosures are offline(beyond just, e.g., 170(0)) such that given data cannot be recoveredthrough erasure coded recovery mechanisms, then a write fail may bereturned to the file system 110. Assuming a sufficient number ofenclosures are operating, the write request is issued to the WL,key-to-physical medium map logic 155(2). A StripeUpdatePacket is thengenerated and sent to all active/alive enclosures. Once enoughenclosures have acknowledged the write has been successfully persisted,the write request is acknowledged back to filesystem 110.

Reference is also made to FIG. 5 in connection with a read request thatends up being targeted for an offline disk drive, in this case D0,171(0). Assume a user wants to read LBA0 of file 1 120(1). The filesystem 110 refers to filemap1 125(1), and determines the key required toserve LBA0 for file1, namely “K3, D0” (see, e.g., FIG. 4). The readrequest is initiated while physical enclosure 0 170(0) is offline, andthus the read request is routed to physical enclosure 0, 170(0). Thefile system 110 detects that physical enclosure 0, 170(0) is notaccessible and thus redirects the read request to write leader 2, namelykey-to-physical medium map logic 155(2). In one possible implementation,write leader election is performed and the result is provided to thefile system. In another possible implementation, the leader electionprocess is deterministic such that, e.g., the lowest numbered availableenclosure becomes the leader. Key-to-physical medium map logic 155(2)looks up K3 in its key-to-physical medium map 150(2) and learns that thedata being sought is stored on D0, 171(0). In one embodiment, eachinstance of key-to-physical medium map logic 155, i.e., 155(0), 155(1).155(2), 155(3), 155(4) is aware through, e.g., a heartbeat mechanism,which of the instances is operational. With such functionality,key-to-physical medium map logic 155(2) knows that enclosure 170(0) maybe unavailable, and thus infers that RAID stripe 0 has to bereconstructed using the, e.g., the parity data stored in the stripe.That is, key-to-physical medium map logic 155(2) reconstructs D0, PS0from the RAID stripe [D1,PS0][D2,PS0][D3,PS0][D4,PS0]. As such, data“AAA” is reconstructed and returned to the file system 110 bykey-to-physical medium map logic 155(2), even though the data beingsought was originally stored in physical enclosure 0, 170(0).

Next is described what occurs when a physical enclosure comes backonline after having been offline for some period of time. In this case,and still referring to FIG. 5, it is assumed that physical enclosure 0,170(0) was temporarily offline and the system continued to operate,including storing RAID stripe 5. Physical enclosure 0, 170(0) then comesback online, key-to-physical medium map logic 155(0) on physicalenclosure 0, 170(0) looks at its copy of the key-to-physical medium map150(0) and compares it with any active key-to-physical map 150 in thesystem, e.g., key-to-physical medium map 150(1). Key-to-physical mediummap logic 155(0) can quickly infer that its key-to-physical medium map150(0) is missing keys K4, K5, K6 as they are present on key-to-physicalmedium map 150(1), but not in its own key-to-physical medium map 150(0).Key-to-physical medium map logic 155(0) infers that it is responsiblefor K6->D0, PS5. As such, key-to-physical medium map logic 155(0)reconstructs D0, PS5 contents->XXX by reading RAID Stripe 5.Key-to-physical medium map logic 155(0) writes “XXX” to D0, PS5 and alsoupdates key-to-physical medium map 150(0) to host K4, K5, K6.

FIGS. 6A and 6B depict states of an array of disks in connection with aRAID stripe relocation in accordance with an example embodiment. Thereare at least two instances in which it may be desirable to rewrite orrelocate a given stripe in storage medium 175. In a first instance,errors may be detected at a sector, e.g., physical sector 0, on D2,171(2) (such that data “CCC” can longer be read correctly). In a secondinstance, K1, to with which data “CCC” is associated, is no longerreferred to by the file system 110. That is, data “CCC” is no longerneeded, and that sector could be freed up as part of a garbagecollection routine. Moving or relocating a given RAID stripe can addressboth of the foregoing instances. In FIGS. 6A and 6B, RAID stripe 0 ismoved to RAID stripe 9. The key-to-physical medium maps 150(0), . . . ,150(4) are also updated accordingly.

More specifically, in the example of FIGS. 6A and 6B, assume thatkey-to-physical medium map logic 155(0) on physical enclosure 0, 170(0),is acting as write leader, and initiates a relocate for a “sourcestripe.” The source stripe in this case is Stripe 0. In connection withthe relocate, key-to-physical medium map logic 155(0) copies all of thecontents of the affected stripe, and prepares a new “destination stripe”with the contents of the affected stripe. The destination stripe inFIGS. 6A and 6B is Stripe 9. In preparing the contents, key-to-physicalmedium map logic 155(0) may need to recover given data that might not beaccessible in the source stripe, and can use erasure coding recovery toobtain the desired or missing data.

Key-to-physical medium map logic 155(0) then creates a packet with apayload for the new stripe, including the data for each sector, theparity data, keys, and an indication of the location of the stripe to berelocated (in this case Stripe 0). Key-to-physical medium map logic155(0) then sends that payload to each of the drives, and further causesthe key-to-physical medium maps 150(0), . . . , 150(4) to be updated(FIG. 6C).

In an embodiment, the key-to-physical medium map logic 155 instancesrunning on each of the enclosures 170(0) . . . 170(4) may be configuredto delete a source stripe at a future time (i.e., not at the time adestination stripe has been written to). More specifically, once a givenstripe is relocated to its destination stripe, the source stripe is notnecessarily deleted at the same time. Rather, a given source stripe maybe deleted upon receipt of a subsequent stripe write request. That is,receipt of a new packet for another stripe may be considered implied“barrier” beyond which it is guaranteed that the data remapping hasmaterialized and it is safe to delete a prior source stripe. This is whythe packet may also contain the indication of the location of the stripeto be relocated (the source stripe). The key-to-physical medium maplogic 155 instance maintains a list of stripes to be deleted, and canperform such deletion at a future time, not tied to a given writeprocess. Indeed, source stripes may be deleted in a batch mode using thelist of stripes to be deleted.

It should also be noted that data that is stored on a given disk 171 hasto stay on that same disk in connection with a stripe relocation, forthe token/hint based read routing to work. As noted above with respectto FIG. 3, a given file map may include not only a key, but also a disknumber (or other token/hint) that enables a more efficient readoperation for the desired data. If data were to move around acrossdisks, then the disk number or token would also have to be updated. Suchan operation would involve updating the client data structures pointingto the changed key which would be cumbersome and may slow down theperformance of the overall system.

FIG. 7 is a flow chart depicting a series of operations for operating astorage system in accordance with an example embodiment. In anembodiment, key-to-physical medium map logic 155 (or any individualinstantiation thereof) may be configured to provide operations ofreceiving a write request for first data from a file system (710),selecting a physical sector on a selected storage device in an array ofstorage devices on which to store the first data (712), assigning a keyto the physical sector (714), storing the key and an indication of thephysical sector in a key-to-physical medium map (716), erasure codingthe data, including generating parity data associated with the firstdata (718), writing the first data and the parity data as a data stripeto each storage device in the array of storage devices (720), and inresponse to receiving the write request, sending the key to the filesystem (722).

FIG. 8 is another flow chart depicting a series of operations foroperating a storage system in accordance with an example embodiment.More specifically, the following describes operations for relocating adata stripe from a source stripe to a destination stripe and updatingthe key-to-physical medium map(s).

In an embodiment, key-to-physical medium map logic 155 (or anyindividual instantiation thereof) may be configured to provideoperations of determining that a first data stripe stored across a firstset of physical sectors on respective storage devices in an array ofstorage devices is to be relocated to a second data stripe stored acrossa second set of physical sectors on the respective storage devices inthe array of storage devices (810), generating a packet with a payloadcomprising data for the second data stripe (812), sending the packet tothe array of storage devices (814), receiving acknowledgments fromrespective storage devices in the array of storage devices that the datain the payload has been successfully persisted (816), and updating akey-to physical medium map on each respective storage devices in thearray of storage devices (818), wherein the key-to-physical medium mapassociates keys with respective physical sectors on the respectivestorage devices in the array of storage devices, and wherein a filesystem accesses the data via the keys.

FIG. 9 depicts a device (e.g., a storage system or server device) onwhich the several described embodiments may be implemented.

The device, e.g., storage system 175, may be implemented on or as acomputer system 901. The computer system 901 may be programmed toimplement a computer based device. The computer system 901 includes abus 902 or other communication mechanism for communicating information,and a processor 903 coupled with the bus 902 for processing theinformation. While the figure shows a single block 903 for a processor,it should be understood that the processor 903 represents a plurality ofprocessors or processing cores, each of which can perform separateprocessing. The computer system 901 may also include a main memory 904,such as a random access memory (RAM) or other dynamic storage device(e.g., dynamic RAM (DRAM), static RAM (SRAM), and synchronous DRAM (SDRAM)), coupled to the bus 902 for storing information and instructions(e.g., the key-to-physical medium map 150 and key-to-physical medium maplogic 155) to perform the operations described herein and to be executedby processor 903. In addition, the main memory 904 may be used forstoring temporary variables or other intermediate information during theexecution of instructions by the processor 903.

The computer system 901 may further include a read only memory (ROM) 905or other static storage device (e.g., programmable ROM (PROM), erasablePROM (EPROM), and electrically erasable PROM (EEPROM)) coupled to thebus 902 for storing static information and instructions for theprocessor 903.

The computer system 901 may also include a disk controller 706 coupledto the bus 902 to control one or more storage devices for storinginformation and instructions, such as a magnetic hard disk 907, and aremovable media drive 908 (e.g., floppy disk drive, read-only compactdisc drive, read/write compact disc drive, compact disc jukebox, tapedrive, and removable magneto-optical drive). The storage devices may beadded to the computer system 701 using an appropriate device interface(e.g., small computer system interface (SCSI), integrated deviceelectronics (IDE), enhanced-IDE (E-IDE), direct memory access (DMA), orultra-DMA).

The computer system 901 may also include special purpose logic devices(e.g., application specific integrated circuits (ASICs)) or configurablelogic devices (e.g., simple programmable logic devices (SPLDs), complexprogrammable logic devices (CPLDs), and field programmable gate arrays(FPGAs)), that, in addition to microprocessors and digital signalprocessors may individually, or collectively, are types of processingcircuitry. The processing circuitry may be located in one device ordistributed across multiple devices.

The computer system 901 may also include a display controller 909coupled to the bus 902 to control a display 910, such as a cathode raytube (CRT) or liquid crystal display (LCD), for displaying informationto a computer user. The computer system 901 may include input devices,such as a keyboard 911 and a pointing device 912, for interacting with acomputer user and providing information to the processor 903. Thepointing device 912, for example, may be a mouse, a trackball, or apointing stick for communicating direction information and commandselections to the processor 903 and for controlling cursor movement onthe display 910. In addition, a printer may provide printed listings ofdata stored and/or generated by the computer system 901.

The computer system 901 performs a portion or all of the processingoperations of the embodiments described herein in response to theprocessor 903 executing one or more sequences of one or moreinstructions contained in a memory, such as the main memory 904. Suchinstructions may be read into the main memory 904 from another computerreadable medium, such as a hard disk 907 or a removable media drive 908.One or more processors in a multi-processing arrangement may also beemployed to execute the sequences of instructions contained in mainmemory 904. In alternative embodiments, hard-wired circuitry may be usedin place of or in combination with software instructions. Thus,embodiments are not limited to any specific combination of hardwarecircuitry and software.

As stated above, the computer system 901 includes at least one computerreadable medium or memory for holding instructions programmed accordingto the embodiments presented, for containing data structures, tables,records, or other data described herein. Examples of computer readablemedia are compact discs, hard disks, floppy disks, tape, magneto-opticaldisks, PROMs (EPROM, EEPROM, flash EPROM), DRAM, SRAM, SD RAM, or anyother magnetic medium, compact discs (e.g., CD-ROM), or any otheroptical medium, punch cards, paper tape, or other physical medium withpatterns of holes, or any other medium from which a computer can read.

Stored on any one or on a combination of non-transitory computerreadable storage media, embodiments presented herein include softwarefor controlling the computer system 901, for driving a device or devicesfor implementing the described embodiments, and for enabling thecomputer system 901 to interact with a human user. Such software mayinclude, but is not limited to, device drivers, operating systems,development tools, and applications software. Such computer readablestorage media further includes a computer program product for performingall or a portion (if processing is distributed) of the processingpresented herein.

The computer code may be any interpretable or executable code mechanism,including but not limited to scripts, interpretable programs, dynamiclink libraries (DLLs), Java classes, and complete executable programs.Moreover, parts of the processing may be distributed for betterperformance, reliability, and/or cost.

The computer system 901 also includes a communication interface 913coupled to the bus 902. The communication interface 913 provides atwo-way data communication coupling to a network link 914 that isconnected to, for example, a local area network (LAN) 915, or to anothercommunications network 916. For example, the communication interface 913may be a wired or wireless network interface card or modem (e.g., withSIM card) configured to attach to any packet switched (wired orwireless) LAN or WWAN. As another example, the communication interface913 may be an asymmetrical digital subscriber line (ADSL) card, anintegrated services digital network (ISDN) card or a modem to provide adata communication connection to a corresponding type of communicationsline. Wireless links may also be implemented. In any suchimplementation, the communication interface 913 sends and receiveselectrical, electromagnetic or optical signals that carry digital datastreams representing various types of information.

The network link 914 typically provides data communication through oneor more networks to other data devices. For example, the network link914 may provide a connection to another computer through a local areanetwork 915 (e.g., a LAN) or through equipment operated by a serviceprovider, which provides communication services through a communicationsnetwork 916. The local network 914 and the communications network 916use, for example, electrical, electromagnetic, or optical signals thatcarry digital data streams, and the associated physical layer (e.g., CAT5 cable, coaxial cable, optical fiber, etc.). The signals through thevarious networks and the signals on the network link 914 and through thecommunication interface 913, which carry the digital data to and fromthe computer system 901 may be implemented in baseband signals, orcarrier wave based signals. The baseband signals convey the digital dataas unmodulated electrical pulses that are descriptive of a stream ofdigital data bits, where the term “bits” is to be construed broadly tomean symbol, where each symbol conveys at least one or more informationbits. The digital data may also be used to modulate a carrier wave, suchas with amplitude, phase and/or frequency shift keyed signals that arepropagated over a conductive media, or transmitted as electromagneticwaves through a propagation medium. Thus, the digital data may be sentas unmodulated baseband data through a “wired” communication channeland/or sent within a predetermined frequency band, different thanbaseband, by modulating a carrier wave. The computer system 901 cantransmit and receive data, including program code, through thenetwork(s) 915 and 916, the network link 914 and the communicationinterface 913. Moreover, the network link 914 may provide a connectionto a mobile device 917 such as a personal digital assistant (PDA) laptopcomputer, cellular telephone, or modem and SIM card integrated with agiven device.

In summary, in one form, a method is provided. The method includesreceiving a write request for first data from a file system, selecting aphysical sector on a selected storage device in an array of storagedevices on which to store the first data, assigning a key to thephysical sector, storing the key and an indication of the physicalsector in a key-to-physical medium map, erasure coding the data,including generating parity data associated with the first data, writingthe first data and the parity data as a data stripe to each storagedevice in the array of storage device; and in response to receiving thewrite request, sending the key to the file system.

The method may further include storing in the key-to-physical mediummap, along with the indication of the physical sector, an indication ofthe selected storage device.

The method may also include storing the key-to-physical medium map oneach storage device in the array of storage devices.

In one embodiment, the method includes designating one of the storagedevices in the array of storage devices as write leader, and thereafterrouting all write requests received from the file system to the writeleader.

In one implementation, the method includes after writing the first dataand the parity data as a data stripe to each storage device in the arrayof storage devices, but before sending the key to the file system,receiving an acknowledgement from each storage device in the array ofstorage devices that respective writes to the storage devices in thearray of storage devices was successfully persisted. Alternatively,acknowledgements from an agreed upon number (i.e., a subset) of storagedevices depending upon the erasure coding parameters (for example inRAID 5, a response from 3+ out of the 5 disks involved can represent astable or persistent write).

In another implementation, the method includes writing the first dataand the parity data as a data stripe to each storage device in the arrayof storage devices comprises sending a packet to each storage device inthe array of storage devices comprising the first data, the parity data,and the key.

In one embodiment, the method further includes receiving a read requestfrom the file system, the read request including the key, looking up thekey in the key-to-physical medium map and obtaining a physical sector onthe selected storage device from which to read the first data, readingthe first data from the physical sector, and, in response to the readrequest, returning the first data to the file system.

In an embodiment, the read request is received at one of the storagedevices in the array of storage devices that is not the selected storagedevice.

The method may further include obtaining the first data via an erasurecoding recovery mechanism using data, other than the first data, storedthe data stripe.

Each storage device in the array of storage devices may be disposed in asingle enclosure, or in respective enclosures.

In another form, a device may also be provided in accordance with anembodiment. The device may include an interface unit configured toenable network communications, a memory, and one or more processorscoupled to the interface unit and the memory, and configured to: receivea write request for first data from a file system, select a physicalsector on a selected storage device in an array of storage devices onwhich to store the first data, assign a key to the physical sector,store the key and an indication of the physical sector in akey-to-physical medium map, erasure code the data, including generatingparity data associated with the first data, write the first data and theparity data as a data stripe to each storage device in the array ofstorage devices, and, in response to receipt of the write request, sendthe key to the file system.

The one or more processors may further be configured to store in thekey-to-physical medium map, along with the indication of the physicalsector, an indication of the selected storage device.

The one or more processors may further be configured to store thekey-to-physical medium map on each storage device in the array ofstorage devices.

The one or more processors may further be configured to designate one ofthe storage devices in the array of storage devices as write leader, andthereafter route all write requests received from the file system to thewrite leader.

The one or more processors are further configured to: receive a readrequest from the file system, the read request including the key, lookup the key in the key-to-physical medium map and obtain a physicalsector on the selected storage device from which to read the first data,read the first data from the physical sector, and, in response to theread request, return the first data to the file system.

In still another form, a non-transitory computer readable storage mediais provided that is encoded with instructions that, when executed by aprocessor, cause the processor to perform operations including: receivea write request for first data from a file system, select a physicalsector on a selected storage device in an array of storage devices onwhich to store the first data, assign a key to the physical sector,store the key and an indication of the physical sector in akey-to-physical medium map, erasure code the data, including generatingparity data associated with the first data, write the first data and theparity data as a data stripe to each storage device in the array ofstorage devices, and in response to receiving of the write request, sendthe key to the file system.

The instructions may further include instructions that, when executed bya processor, cause the processor to store in the key-to-physical mediummap, along with the indication of the physical sector, an indication ofthe selected storage device.

The instructions may further include instruction that, when executed bya processor, cause the processor to store the key-to-physical medium mapon each storage device in the array of storage devices.

The instructions may further include instruction that, when executed bya processor, cause the processor to designate one of the storage devicesin the array of storage devices as write leader, and thereafter routeall write requests received from the file system to the write leader.

Another method is provided that includes determining that a first datastripe stored across a first set of physical sectors on respectivestorage devices in an array of storage devices is to be relocated to asecond data stripe stored across a second set of physical sectors on therespective storage devices in the array of storage devices, generating apacket with a payload comprising data for the second data stripe and anindication of a location of the first stripe, sending the packet to thearray of storage devices, receiving acknowledgments from respectivestorage devices in the array of storage devices that the data in thepayload has been successfully persisted, updating a key-to physicalmedium map on each respective storage devices in the array of storagedevices, wherein the key-to-physical medium map associates keys withrespective physical sectors on the respective storage devices in thearray of storage devices, and wherein a file system accesses the datavia the keys.

In the method the data comprises parity data associated with an erasurecoding scheme.

In the method, determining that a first data stripe stored across afirst set of physical sectors on respective storage devices in an arrayof storage devices is to be relocated to a second data stripe storedacross a second set of physical sectors on the respective storagedevices in the array of storage devices comprises determining that agiven one of the physical sectors used in connection with the first datastripe cannot be accessed.

The method may further comprise comprising recovering information in thegiven one of the physical sectors using an erasure coding recoveryprocess, and including the information with the data.

In the method, determining that a first data stripe stored across afirst set of physical sectors on respective storage devices in an arrayof storage devices is to be relocated to a second data stripe storedacross a second set of physical sectors on the respective storagedevices in the array of storage devices comprises determining thatinformation in a given one of the physical sectors is no longer referredto by the file system.

The method may still further include deleting the first stripe aftersending another packet for a third data stripe to be stored across athird set of physical sectors on the respective storage devices in thearray of storage devices.

The method may also include deleting multiple stripes in a batch aftersending another packet for a third data stripe to be stored across athird set of physical sectors on the respective storage devices in thearray of storage devices.

In another form, a device is provided that comprises an interface unitconfigured to enable network communications, a memory, and one or moreprocessors coupled to the interface unit and the memory, and configuredto: generate a packet with a payload comprising data for the second datastripe and an indication of a location of the first stripe, send thepacket to the array of storage devices, receive acknowledgments fromrespective storage devices in the array of storage devices that the datain the payload has been successfully persisted, and update a key-tophysical medium map on each respective storage devices in the array ofstorage devices, wherein the key-to-physical medium map associates keyswith respective physical sectors on the respective storage devices inthe array of storage devices, and wherein a file system accesses thedata via the keys.

The data may comprise parity data associated with an erasure codingscheme.

The one or more processors may be configured to determine that a firstdata stripe stored across a first set of physical sectors on respectivestorage devices in an array of storage devices is to be relocated to asecond data stripe stored across a second set of physical sectors on therespective storage devices in the array of storage devices bydetermining that a given one of the physical sectors used in connectionwith the first data stripe cannot be accessed.

The one or more processors may further be configured to recoverinformation in the given one of the physical sectors using an erasurecoding recovery process, and include the information with the data.

The one or more processors may be configured to determine that a firstdata stripe stored across a first set of physical sectors on respectivestorage devices in an array of storage devices is to be relocated to asecond data stripe stored across a second set of physical sectors on therespective storage devices in the array of storage devices bydetermining that information in a given one of the physical sectors isno longer referred to by the file system.

The one or more processors may be configured to delete the first stripeafter the one or more processors send another packet for a third datastripe to be stored across a third set of physical sectors on therespective storage devices in the array of storage devices.

The one or more processors may be configured to delete multiple stripesin a batch after the one or more processors send another packet for athird data stripe to be stored across a third set of physical sectors onthe respective storage devices in the array of storage devices.

In still another form, a non-transitory computer readable storage mediais provided that is encoded with instructions that, when executed by aprocessor, cause the processor to: generate a packet with a payloadcomprising data for the second data stripe and an indication of alocation of the first stripe, send the packet to the array of storagedevices, receive acknowledgments from respective storage devices in thearray of storage devices that the data in the payload has beensuccessfully persisted, and update a key-to physical medium map on eachrespective storage devices in the array of storage devices, wherein thekey-to-physical medium map associates keys with respective physicalsectors on the respective storage devices in the array of storagedevices, and wherein a file system accesses the data via the keys.

The data may comprise parity data associated with an erasure codingscheme.

The instructions may further include instructions that, when executed bya processor, cause the processor to determine that a first data stripestored across a first set of physical sectors on respective storagedevices in an array of storage devices is to be relocated to a seconddata stripe stored across a second set of physical sectors on therespective storage devices in the array of storage devices bydetermining that a given one of the physical sectors used in connectionwith the first data stripe cannot be accessed.

The instructions may further include instructions that, when executed bya processor, cause the processor to recover information in the given oneof the physical sectors using an erasure coding recovery process, andinclude the information with the data.

The instructions may further include instructions that, when executed bya processor, cause the processor to determine that a first data stripestored across a first set of physical sectors on respective storagedevices in an array of storage devices is to be relocated to a seconddata stripe stored across a second set of physical sectors on therespective storage devices in the array of storage devices bydetermining that information in a given one of the physical sectors isno longer referred to by the file system.

Each storage device in the array of storage devices may be disposed in arespective enclosure.

The above description is intended by way of example only. Variousmodifications and structural changes may be made therein withoutdeparting from the scope of the concepts described herein and within thescope and range of equivalents of the claims.

What is claimed is:
 1. A method comprising: receiving a write requestfor first data from a file system; selecting a physical sector on aselected storage device in an array of storage devices on which to storethe first data; assigning a key to the physical sector; storing the keyand an indication of the physical sector in a key-to-physical mediummap; erasure coding the data, including generating parity dataassociated with the first data; writing the first data and the paritydata as a data stripe to each storage device in the array of storagedevices; and in response to receiving the write request, sending the keyto the file system.
 2. The method of claim 1, further comprising storingin the key-to-physical medium map, along with the indication of thephysical sector, an indication of the selected storage device.
 3. Themethod of claim 1, further comprising storing the key-to-physical mediummap on each storage device in the array of storage devices.
 4. Themethod of claim 1, further comprising designating one of the storagedevices in the array of storage devices as write leader, and thereafterrouting all write requests received from the file system to the writeleader.
 5. The method of claim 1, further comprising after writing thefirst data and the parity data as a data stripe to each storage devicein the array of storage devices, but before sending the key to the filesystem, receiving an acknowledgement from each storage device in thearray of storage devices that respective writes to each storage devicein the array of storage devices was successfully persisted.
 6. Themethod of claim 1, wherein writing the first data and the parity data asa data stripe to each storage device in the array of storage devicescomprises sending a packet to each storage device in the array ofstorage devices comprising the first data, the parity data, and the key.7. The method of claim 1, further comprising: receiving a read requestfrom the file system, the read request including the key; looking up thekey in the key-to-physical medium map and obtaining a physical sector onthe selected storage device from which to read the first data; readingthe first data from the physical sector; and in response to the readrequest, returning the first data to the file system.
 8. The method ofclaim 7, wherein the read request is received at one of the storagedevices in the array of storage devices that is not the selected storagedevice.
 9. The method of claim 8, further comprising obtaining the firstdata via an erasure coding recovery mechanism using data, other than thefirst data, stored the data stripe.
 10. The method of claim 1, whereineach storage device in the array of storage devices is disposed in asingle enclosure.
 11. The method of claim 1, wherein each storage devicein the array of storage devices is disposed in respective enclosures.12. A device comprising: an interface unit configured to enable networkcommunications; a memory; and one or more processors coupled to theinterface unit and the memory, and configured to: receive a writerequest for first data from a file system; select a physical sector on aselected storage device in an array of storage devices on which to storethe first data; assign a key to the physical sector; store the key andan indication of the physical sector in a key-to-physical medium map;erasure code the data, including generating parity data associated withthe first data; write the first data and the parity data as a datastripe to each storage device in the array of storage devices; and inresponse to receipt of the write request, send the key to the filesystem.
 13. The device of claim 12, wherein the one or more processorsare further configured to store in the key-to-physical medium map, alongwith the indication of the physical sector, an indication of theselected storage device.
 14. The device of claim 12, wherein the one ormore processors are further configured to store the key-to-physicalmedium map on each storage device in the array of storage devices. 15.The device of claim 12, wherein the one or more processors are furtherconfigured to designate one of the storage devices in the array ofstorage devices as write leader, and thereafter route all write requestsreceived from the file system to the write leader.
 16. The device ofclaim 12, wherein the one or more processors are further configured toreceive a read request from the file system, the read request includingthe key; look up the key in the key-to-physical medium map and obtain aphysical sector on the selected storage device from which to read thefirst data; read the first data from the physical sector; and inresponse to the read request, return the first data to the file system.17. A non-transitory computer readable storage media encoded withinstructions that, when executed by a processor, cause the processor to:receive a write request for first data from a file system; select aphysical sector on a selected storage device in an array of storagedevices on which to store the first data; assign a key to the physicalsector; store the key and an indication of the physical sector in akey-to-physical medium map; erasure code the data, including generatingparity data associated with the first data; write the first data and theparity data as a data stripe to each storage device in the array ofstorage devices; and in response to receiving of the write request, sendthe key to the file system.
 18. The non-transitory computer readablestorage media of claim 17, further including instructions that, whenexecuted by a processor, cause the processor to store in thekey-to-physical medium map, along with the indication of the physicalsector, an indication of the selected storage device.
 19. Thenon-transitory computer readable storage media of claim 17, furtherincluding instructions that, when executed by a processor, cause theprocessor to store the key-to-physical medium map on each storage devicein the array of storage devices.
 20. The non-transitory computerreadable storage media of claim 17, further including instructions that,when executed by a processor, cause the processor to designate one ofthe storage devices in the array of storage devices as write leader, andthereafter route all write requests received from the file system to thewrite leader.